/***********************************************************************
* Copyright  2023 客户公司名称
* @URL: 
* @ProjectName: 项目名称
* @Description: 定时任务类 将客户的公司人数字段值清空
* Modification Log :
------------------------------------------------------------------------
* Developer                   Date                   Description
* ----------------------------------------------------------------------
* name				2023-10-22      NULL 
***********************************************************************/
public with sharing class ClearAccountCompanyNumsScheduler implements Schedulable{

    public void execute(SchedulableContext ctx) {
        // 查询需要更新的客户记录
        List<Account> accountUpdateList = [SELECT Id, NumberOfEmployees FROM Account WHERE NumberOfEmployees != null];
        
        // 遍历客户记录，将公司人数字段值清空
        for(Account acc : accountUpdateList) { 
            acc.NumberOfEmployees = null;
        }
        
        // 更新客户记录
        update accountUpdateList;
    }
}